/**
 * Created by sallyxie on 2017/7/29.
 */
Date.prototype.toDateInputValue = (function() {
    var local = new Date(this);
    local.setMinutes(this.getMinutes() - this.getTimezoneOffset());
    return local.toJSON().slice(0,10);
});

$(document).ready(function () {

    $("#navigation").on("click","[name='link']",function () {
       localStorage.setItem("navname",$(this).attr("data-navname"));
        location.href=$(this).attr("data-url");
    });
});

function WebsiteInfoSearch() {
    var searchHTML='<div class="searchBar">日期：<input type="date" id="searchDate" /></div>';
    $(".tDiv2").prepend(searchHTML);
    searchHTML='<div class="searchRight"><input type="text" placeholder="根据域名(公司名，分类)查询" />'
    +'<div class="fbutton"><div><span class="search" style="padding-left: 20px;">精确搜索</span></div></div>'
    +'<div class="fbutton"><div><span class="search" style="padding-left: 20px;">模糊搜索</span></div></div></div>';
    $(".tDiv2").append(searchHTML);
    $('#searchDate').val(new Date().toDateInputValue());
}

function InitSearchModule() {
    var searchHTML='<div class="searchBar">日期：<input type="date" /></div>';
    $(".tDiv2").prepend(searchHTML);
}


//分割线
function getSplitIcon() {
    var splitIcon=[{id:0,name:"|"}];
    var splitHTML='';
    for(var i=0;i<splitIcon.length;i++){
        splitHTML+='<option value="'+splitIcon[i].id+'">'+splitIcon[i].name+'</option>';
    }
    return splitHTML;
}
